%{
#include<iostream>
#include<cstdio>
#include<set>
using namespace std;    
int appear=0;
int count=0;
set<long long>n;
%}  
name NAME$
number [0-9]
num {number}{9}
nc ^{num}
numbers {number}+
digit {numbers}(\.{numbers})?
%%  
{name} {cout<<"LJT";}
{nc} {cout<<"201492070";}
{digit} {long long l=0;char *a=yytext;int i=0;while(*a!='.'&&i<yyleng){i++;}{l=10*l+(*a-'0');a++;}while(i!=yyleng){a++;int j=(*a-'0');if(j>=5)l++;}l*=2;l+=201492070;cout<<l;appear++;n.insert(l);}
. {cout<<yytext;}
%%  
int main()  
{  
    yylex();  
    count=n.size();
    printf("%d\t%d\n",appear,count);
    return 0;    
}  
int yywrap()  
{  
     return 1;  
}			 
